package info.niwota.home;

import instant.openvfs.home.Debug;
import jvs.vfs.opt.OpenVFS;
import android.app.Application;
import android.content.Context;
import android.util.Log;
import dalvik.system.VMRuntime;

/**
 * @author qiangli
 * 
 */
public class HomeApplication extends Application {

	private static final String TAG = "HomeApplication";

	private static final float HEAP_UTILIZATION = 0.75f;

	private static final long HEAP_SIZE = 4 * 1024 * 1024;
	
	public static Context context;

	@Override
	public void onCreate() {
		context = this;
		if (Debug.DEBUG) {
			Log.v(TAG, "onCreate: " + this);
		}
		VMRuntime rt = VMRuntime.getRuntime();
		rt.setTargetHeapUtilization(HEAP_UTILIZATION);
		rt.setMinimumHeapSize(HEAP_SIZE);

		super.onCreate();
		//
		OpenVFS.init(context);

	}

}
